The electronic generation of an image is often done digitally. Often this is accomplished by a digital scanning device which takes the original analog image and converts it into a series of pixels, or picture elements, each of which is comprised of a number of bits. The image which is captured digitally is then reconstructed on a display device such as a CRT or thermal printer. For monochrome devices each pixel is encoded with a single n-bit number, while color systems commonly use a triple of binary numbers. Color systems typically use three (four in some instances) spectral components (see "Color Mixture and Fundamental Metamers: Theory, Algebra, Application," by Cohen and Kappauf, A. J. Psych., Vol. 98, No. 2, pp 171-259, Summer 1985) such as inks, toners, dyes, and phosphors to represent color space. Different colors are composed of combinations of these components. The relative amounts of the components form a coordinate system for the gamut of colors which can be represented. The color components are often referred to as the color primaries. In order to capture an image digitally, the analog image must be quantized into discrete digital values represented by n-bit code words.
When quantizing a signal the quantization regions are known as bins and the edges of the quantization regions are known as decision points.
It is possible that the input device can capture an image with more bits/pixel than can be displayed on the output device. Since the image has already been quantized into discrete levels, reducing the number of bits/pixel requires a secondary quantization of the original analog image signal also referred to herein as requantization.
One method of secondary quantization is simply to ignore the low order bits of the digital data. For example a 12-bit/pixel signal can be requantized to an 8-bit/pixel signal by eliminating the four least significant bits of each code word. Because this method does not account for non-linearities of the visual perception of color, it is not visually optimal. The result from such an approach can have visually objectionable contouring and a noticeable loss of continuous-tone quality. A two-dimensional slice for the three-dimensional secondary quantization using this method is shown in FIG. 2.
Quantization and secondary quantization via a functional form is another common approach, where the function .function.(.sub.--) (such as a cube root function) models the output of the system and the range of the output is uniformly quantized. If the decision points of the quantization of the output are denoted by d.sub.i, i=0, . . . , 2.sup.n -1, then the input quantization decision points are f.sup.-1 (d.sub.i). For color systems these simple secondary quantization schemes are not optimal from a visual perspective.
The use of channel-independent non-linear functions is also an approach to the secondary quantization. It suffers since it is visually sub-optimal and functional non-linearities do not fully utilize all possible secondary quantization levels. The visual sub-optimality is due to channel dependencies which the channel independent approach ignores.
Other approaches employ image metrics, such as variance or mean value of the pixels within an image to change the sampling rate adaptively (see "System for Requantization of Coded Picture Signals," by Yoshinori Hatori and Massahide Kaneko, U.S. Pat. No. 4,677,479) or to change the quantizer adaptively (see "Adaptive Type Quantizer," by Sumio Mori, U.S. Pat. No. 4,386,366). These schemes are signal dependent, and may not result in a minimal distortion to the output.
A final method is to partition the signal space into non-rectilinear cells is referred to as vector quantization (see R. M. Gray, "Vector quantization," IEEE ASSP Magazine, Vol. 1, April, 1984, pp. 4-29). This approach is illustrated in FIG. 3. Quantization occurs by matching a signal with the cell that results in minimal distortion. Since the quantization cells are not in general rectilinear with respect to the signal axes, an exhaustive table search algorithm must also be employed. Variations to this approach that decompose the space with m-ary trees are more efficient to implement, but are sub-optimal.
It is the object of the present invention to provide look-up tables which are channel separable and that are independent of the input signal. This approach is advantageous since the secondary quantization does not require adaptive processing hardware, and the implementation can be done by a set of look-up tables, which are separable, i.e., for n channels c.sub.1 through c.sub.n, Q(c.sub.1, c.sub.2, . . . , c.sub.n)=(Q.sub.1 (c.sub.1), Q.sub.2 (c.sub.2), . . . , Q.sub.n (c.sub.n)), which simplifies the process. The secondary requantization pattern according to the present invention is represented in FIG. 4, which can be compared to FIGS. 2 and 3. It will be understood that the secondary quantization regions are 3-dimensional and are shown here as 2-dimensional for ease of description. Interchannel signal dependencies are considered in the determination of the set of look-up tables.
It is a further object of the present invention to provide a secondary quantization scheme for color imagery which minimizes the visual perception of information loss, is channel independent, and secondarily quantizes relative to the same color primaries as the original signal. The objects of the present invention are achieved by generating a set of color component requantization look-up tables by minimizing a visual cost function and employing the requantization look-up tables to requantize the color digital image. The look-up tables are generated by performing a first axial requantization of the color primaries of the color image signal, calculating a visual cost resulting from the first requantization, adjusting the first requantization based on visual cost criteria to obtain a second quantization, calculating a visual cost resulting from the second requantization, selecting either the first or second requantization having the least visual cost as a new first requantization, and repeating the steps of adjusting the requantization, calculating a visual cost and selecting the requantization having the least visual cost until a predetermined visual cost criteria is met. Two approaches are disclosed for minimizing the visual cost, one which minimized the maximum visual cost of any secondary quantization region, and the other which minimized the total visual cost of the system. The results depend upon the color primaries, however, the approach is sufficiently general to encompass a wide range of color primaries.
In the preferred modes of practicing the invention the tables are produced using either a minimum mean-square cost or a minimum-maximum cost criteria. The costs may be calculated in a uniform visual space (see Wyszecki and Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd Ed., John Wiley & Sons, New York, 1982) after a transformation from the color space determined from the primaries of the display device.